package com.dfrobot.demo.domain.entity;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.*;
import lombok.Data;

@Data
@Table(name = "df_shipping_coupon_history")
public class DfShippingCouponHistory {
    @Id
    @Column(name = "history_id")
    private Integer historyId;

    /**
     * 用户id
     */
    @Column(name = "customer_id")
    private Integer customerId;

    /**
     * 领取日期
     */
    @Column(name = "coll_date")
    private Date collDate;

    /**
     * 使用日期
     */
    @Column(name = "use_date")
    private Date useDate;

    /**
     * 优惠券id号
     */
    @Column(name = "cp_id")
    private Integer cpId;

    /**
     * 领取优惠券id
     */
    @Column(name = "cp_sub_id")
    private Integer cpSubId;

    /**
     * 实际抵扣金额
     */
    @Column(name = "real_amount")
    private BigDecimal realAmount;

    /**
     * 关联订单id
     */
    @Column(name = "order_id")
    private Integer orderId;

    /**
     * 0：正常，1：锁定  2:已使用 3：已过期
     */
    private Integer status;

    /**
     * 订单总额
     */
    @Column(name = "order_amount")
    private BigDecimal orderAmount;

    /**
     * 优惠券 有效期 开始时间
     */
    @Column(name = "cp_date_start")
    private Date cpDateStart;

    /**
     * 优惠券 有效期 结束时间
     */
    @Column(name = "cp_date_end")
    private Date cpDateEnd;

    /**
     * history记录时间，自动更新，无需手动赋值
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * history更新时间，自动更新，无需手动赋值
     */
    @Column(name = "updated_at")
    private Date updatedAt;

    @Column(name = "cp_sub_save")
    private BigDecimal cpSubSave;

    @Column(name = "cp_sub_over")
    private BigDecimal cpSubOver;

    /**
     * 0:运费券  1:免邮券
     */
    @Column(name = "cp_type")
    private Integer cpType;

    /**
     * 什么级别领取到券
     */
    @Column(name = "cp_level")
    private String cpLevel;

    @Column(name = "is_email")
    private Integer isEmail;

    /**
     * 是否发送邮件
     */
    @Column(name = "is_expire_email")
    private Integer isExpireEmail;
}